package com.bw.database.dao

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update
import com.bw.database.table.UserDaoEntity

/**
 * 用户信息表操作类
 */
@Dao
interface UserInfoDao {

    @Insert
    suspend fun insert(vararg userInfo:UserDaoEntity)

    @Delete
    suspend fun delete(vararg userInfo:UserDaoEntity)

    @Update
    suspend fun update(vararg userInfo:UserDaoEntity)

    @Query("select *from user_table order by id")
    suspend fun queryAll():List<UserDaoEntity>

    @Query("select *from user_table where id = :userId")
    suspend fun queryById(userId:Int):List<UserDaoEntity>


}